﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;

#if !WINRT
using System.Windows.Data;
#else
using Windows.UI.Xaml.Data;
#endif

namespace MishraReader.Converters
{
#if !WINRT
    [ValueConversion(typeof(string), typeof(bool))]
#endif
    public class StringIsNullOrEmptyToBooleanConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter,
#if !WINRT
            CultureInfo culture
#else
 string language
#endif
)
        {
            var str = value as string;

            return string.IsNullOrEmpty(str);
        }

        public object ConvertBack(object value, Type targetType, object parameter,
#if !WINRT
            CultureInfo culture
#else
 string language
#endif
)
        {
            throw new NotImplementedException();
        }
    }
}